package com.generalbackend.common.util;

import org.apache.commons.lang.StringUtils;

/**
 * @author tim.xie
 * @date 2021/12/28 11:03
 */
public class SystemProfileUtil {
    private static final String file_separator = System.getProperty("file.separator");
    private static String profileHome = System.getProperty("general.profile.home", System.getenv("GENERAL_HOME"));

    static {
        if (StringUtils.isEmpty(profileHome)) {
            profileHome = System.getProperty("user.dir");
        }
    }

    private SystemProfileUtil(){}

    public static String getProfileHome() {
        return profileHome;
    }

    public static String getConfPath() {
        return profileHome + file_separator + "conf";
    }

    public static String getFileSeparator() {
        return file_separator;
    }
}
